-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed front page + results page design #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some feedback below. Can you also post a screenshot/gif of the layout here in a GitHub comment?
@@ -67,14 +67,14 @@ def index(request): | |||
|
|||
def info(request): | |||
print("RESTAURANTS", request.POST) | |||
city = request.POST['location'] | |||
city = request.POST['location'].title() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we call .title()
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh that's just to make the first letter capital (like boston --> Boston)
term = request.POST['term'] | ||
data = [city, term] | ||
#yelp_call() returns dictionary of restaurant and its information | ||
restaurants = yelp_call(term, city) | ||
|
||
save_user_request(data) | ||
return render(request, 'basic.html', {'restaurants': restaurants}) | ||
return render(request, 'results.html', {'restaurants': restaurants, 'city': data[0], 'term':data[1]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
095a7c7
to
4b0c15e
Compare
i got rid of the basic.html file and instead added a new one called results.html. You can delete the basic.html.